Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4549 kotlin ijar test cases #4632

Closed
wants to merge 5 commits into from

Conversation

hsyed
Copy link

@hsyed hsyed commented Feb 13, 2018

Inlining test cases for #4549. The jar also contains the metadata file which needs to be retained META-INF/inline-cases.kotlin_module

@bazel-io
Copy link
Member

Can one of the admins verify this patch?

Copy link
Member

@philwo philwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@cushon Could you give this a look as well?

mkdir -p $3 || fail "could not ensure output dir"
${IJAR} $1 $2 || fail "ijar failed"
pushd $3
${JAR} xf $2 || fail "could not extract jar contents"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please just indent with 4 spaces here, too.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's showing up as 4 spaces on my side (not a tab).

inline fun inheritedInlineFun(op: () -> Unit) { op() }
}

object ObjectInheritingInline: AbstractClassWithInline()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add newline at the end of the file.

@@ -0,0 +1,3 @@
#!/bin/bash -eu

kotlinc -module-name inline-cases -d inline-cases.jar InlineCases.kt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add newline at the end of the file.

@hsyed hsyed force-pushed the kotlin-inline-ijar-cases branch from fe3044b to 70d453c Compare February 15, 2018 21:27
@laszlocsomor
Copy link
Contributor

@hsyed : Do you have any updates? Do you still want to merge this PR?

@laszlocsomor
Copy link
Contributor

@philwo , could you please take another look?

Copy link
Member

@philwo philwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know much about Kotlin nor ijar, but this seems like a good addition to the test suite to me.

@laszlocsomor
Copy link
Contributor

Thanks @philwo for the update! Do you want to import this?

@philwo
Copy link
Member

philwo commented Mar 9, 2018

@laszlocsomor Yes, I'll send you a CL. :)

@hsyed
Copy link
Author

hsyed commented Mar 9, 2018

It is ready to merge

@buchgr
Copy link
Contributor

buchgr commented Mar 21, 2018

@hsyed Sorry for the delay. Philipp needs to make some changes internally so that he can import this PR.

@philwo
Copy link
Member

philwo commented Mar 27, 2018

@hsyed I tried to import this PR, but the tests don't pass. I see the following errors. Can you help me figuring out what's wrong?

You can see the current version of the code that I tried to check in here: https://bazel-review.googlesource.com/c/bazel/+/44791 (please ignore any diffs in files except third_party/ijar/... - they are unfortunately generated by our importing script and are just a UI issue)

** test_kotlin_metadata_retention **********************************************
/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/d4fe08e9d117c0a3a25bf2b3039e8671/bazel-sandbox/436426416158653421/execroot/io_bazel/_tmp/6509e9299f97f59c74a8df033517ef10/kotlin/inline /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/d4fe08e9d117c0a3a25bf2b3039e8671/bazel-sandbox/436426416158653421/execroot/io_bazel/bazel-out/k8-fastbuild/bin/third_party/ijar/test/ijar_test.runfiles/io_bazel
/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/d4fe08e9d117c0a3a25bf2b3039e8671/bazel-sandbox/436426416158653421/execroot/io_bazel/bazel-out/k8-fastbuild/bin/third_party/ijar/test/ijar_test.runfiles/io_bazel
-- Test log: -----------------------------------------------------------
------------------------------------------------------------------------
test_kotlin_metadata_retention FAILED: kotlin metadata not retained .
/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/d4fe08e9d117c0a3a25bf2b3039e8671/bazel-sandbox/436426416158653421/execroot/io_bazel/bazel-out/k8-fastbuild/bin/third_party/ijar/test/ijar_test.runfiles/io_bazel/third_party/ijar/test/ijar_test:143: in call to test_kotlin_metadata_retention
FAILED: test_kotlin_metadata_retention

see https://storage.googleapis.com/bazel-buildkite-artifacts/f705022d-d8a8-41bc-8910-61ed9770b060/third_party/ijar/test/ijar_test/attempt_1.log

** test_kotlin_inline_retention ************************************************
/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/d4fe08e9d117c0a3a25bf2b3039e8671/bazel-sandbox/7198431800070087349/execroot/io_bazel/_tmp/80b3b032c13a55d5f62efcda1a9bedd9/kotlin/inline /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/d4fe08e9d117c0a3a25bf2b3039e8671/bazel-sandbox/7198431800070087349/execroot/io_bazel/bazel-out/k8-fastbuild/bin/third_party/ijar/test/ijar_test.runfiles/io_bazel
/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/d4fe08e9d117c0a3a25bf2b3039e8671/bazel-sandbox/7198431800070087349/execroot/io_bazel/bazel-out/k8-fastbuild/bin/third_party/ijar/test/ijar_test.runfiles/io_bazel
-- Test log: -----------------------------------------------------------
public final class ClassWithInline {
  public final void classInlineFun(kotlin.jvm.functions.Function0<kotlin.Unit>);

  public ClassWithInline();
}
------------------------------------------------------------------------
test_kotlin_inline_retention FAILED: javap output missing expected substring:   public final void classInlineFun(kotlin.jvm.functions.Function0<kotlin.Unit>);
    Code: .
/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/d4fe08e9d117c0a3a25bf2b3039e8671/bazel-sandbox/7198431800070087349/execroot/io_bazel/bazel-out/k8-fastbuild/bin/third_party/ijar/test/ijar_test.runfiles/io_bazel/third_party/ijar/test/ijar_test:137: in call to javap_decompile_and_assert_contains
/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/d4fe08e9d117c0a3a25bf2b3039e8671/bazel-sandbox/7198431800070087349/execroot/io_bazel/bazel-out/k8-fastbuild/bin/third_party/ijar/test/ijar_test.runfiles/io_bazel/third_party/ijar/test/ijar_test:148: in call to test_kotlin_inline_retention
FAILED: test_kotlin_inline_retention

see https://storage.googleapis.com/bazel-buildkite-artifacts/f705022d-d8a8-41bc-8910-61ed9770b060/third_party/ijar/test/ijar_test/attempt_4.log

@philwo
Copy link
Member

philwo commented Apr 14, 2018

@hsyed Friendly ping - I would love to get this merged.

@hsyed
Copy link
Author

hsyed commented Apr 17, 2018

@philwo sorry for the day. The test cases are for #4549 they will fail till the ijar tool is updated.

@irengrig
Copy link
Contributor

irengrig commented Sep 4, 2018

Hi All, Bazel sheriff is here. What is the status of this?

@hsyed
Copy link
Author

hsyed commented Sep 4, 2018

This isn't in scope any longer. I'll close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants